package a01objectDemo;

import com.google.gson.Gson;

public class demo1 {
    public static void main(String[] args) throws CloneNotSupportedException {
        int []data = {1,2,3,4,5,6,7,8,9,0};
        User u1 = new User("1","张三","1234qwer","girl11",data);
        //Object u2 = u1.clone();
        //System.out.println(u1);
        //System.out.println(u2);
        Gson gson = new Gson();
        String s = gson.toJson(u1);
        User user = gson.fromJson(s, User.class);
        System.out.println(user);
    }
}
